package com.sun.kafka.entity;

import com.alibaba.fastjson2.JSON;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
public class Message {

    // 监控指标名称
    private String metric;

    // 监控时间戳
    private Date time;

    // 监控指标标签组
    private String tags;

    // 监控指标值
    private String values;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
